package com.xja.entity.pojo;

import com.xja.entity.Indent;
import com.xja.entity.Room;
import com.xja.entity.User;

/**
 * @author zcy
 * @create 2022-05-06 10:11
 */
public class UrByIndent {
    private User user;
    private Room room;
    private Indent indent;

    public UrByIndent(User user, Room room, Indent indent) {
        this.user = user;
        this.room = room;
        this.indent = indent;
    }

    public UrByIndent() {
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Room getRoom() {
        return room;
    }

    public void setRoom(Room room) {
        this.room = room;
    }

    public Indent getIndent() {
        return indent;
    }

    public void setIndent(Indent indent) {
        this.indent = indent;
    }

    @Override
    public String toString() {
        Integer userLevel = user.getUserLevel();
        String str=null;
        if (userLevel==0){
            str="普通用户";
        }else {
            str="VIP用户";
        }
        return "订单信息{" +" 订单编号:" + indent.getIndentId()+
                "客户名字:" + user.getUserName()+" 客户电话:" +user.getUserPhone()+" 客户身份:" +str+" 客户身份证号码:" +user.getUserCard()+
                " 房型种类:" + room.getRoomKind() +" 房型价格:"+room.getRoomPrice()+" 房间楼层:"+room.getRoomFloor()+" 房间名:"+room.getRoomName()+
                " 入住日期:"+indent.getCheckTime()+" 入住时长:"+indent.getDuratiom()+" 客户备注:"+indent.getRemark() +
                '}';
    }
}
